<?php
class SeatDao
{
	public function __construct()
	{
		$this->seatTDG = Db::newDbTable('seat');
	}
	
	public function getSeatList($deskId)
	{
		return $this->seatTDG->fetchRows(array(
			'fields' => 'seat.player_id, seat.id, nickname',
			'where' => array(
				'expression' => 'desk_id = :desk_id',
				'value' => array('desk_id' => $deskId)
			),
			'orderby' => 'order_number',
			'join' => 'LEFT JOIN player ON seat.player_id = player.id',
		));
	}
}